// 自动生成的路由配置
// 此文件由代码生成器自动生成，请勿手动修改


// 模块路由
const filesRoutes = [
  {
    path: '/files',
    name: 'FilesList',
    component: () => import('@/modules/files/list.vue'),
    meta: {
      title: '',
      icon: 'List',
      permission: 'files:list'
    }
  },
  {
    path: '/files/create',
    name: 'FilesCreate',
    component: () => import('@/modules/files/form.vue'),
    meta: {
      title: '新增',
      permission: 'files:create',
      hidden: true
    }
  },
  {
    path: '/files/edit/:id',
    name: 'FilesEdit',
    component: () => import('@/modules/files/form.vue'),
    meta: {
      title: '编辑',
      permission: 'files:update',
      hidden: true
    }
  }
];



// 导出所有模块路由
export const moduleRoutes = [
  ...filesRoutes,

];

// 导出模块信息（用于菜单生成）
export const moduleInfo = [
  {
    name: 'Files',
    path: '/files',
    title: '',
    icon: 'List',
    permission: 'files:list'
  },

];

// 自动注册路由的函数
export function registerModuleRoutes(router) {
  moduleRoutes.forEach(route => {
    router.addRoute(route);
  });
  
  console.log(`🚀 已自动注册 ${moduleRoutes.length} 个模块路由`);
}

// 生成菜单配置
export function generateMenuConfig() {
  return moduleInfo.map(module => ({
    path: module.path,
    name: module.name,
    meta: {
      title: module.title,
      icon: module.icon,
      permission: module.permission
    }
  }));
}
